package springbootreactor;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import reactor.bus.EventBus;
import reactor.event.Event;
import reactor.spring.context.annotation.Consumer;
import reactor.spring.context.annotation.Selector;

import javax.annotation.Resource;

@Consumer
public class SayhitHandler {
    @Resource
    private EventBus eventBus;

    private static Log log=LogFactory.getLog(SayhitHandler.class);
    @Selector(value="testSayhit")
    public void onTestSayhit(String s){
        log.info("onTestSayhit:"+s);
    }

    @Selector(value="testSayhitEvent")
    public void onTestSayhitEvent(Event<String> evt){
        log.info("onTestSayhitEvent:"+evt.getData());
    }

}